package com.wuyou.spring_demo;


import com.wuyou.spring_demo.bean.Animal;
import com.wuyou.spring_demo.service.AnimalService;
import org.springframework.beans.factory.BeanFactory;
import org.springframework.beans.factory.xml.XmlBeanFactory;
import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;
import org.springframework.core.io.ClassPathResource;

public class SpringDemoApplication {

    public static void main(String[] args){
        ApplicationContext ac = new ClassPathXmlApplicationContext("spring-config.xml");
        AnimalService animalService = (AnimalService) ac.getBean("animalService");
        System.out.println(animalService.roar("bark~ bark~ bark..."));
    }

}
